package com.xinzhi.controller;

import com.xinzhi.service.UsersService;
import com.xinzhi.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class UsersController {
    @Autowired
    private UsersService usersService;

    /**
     * 查询用户
     * @param username 用户名
     * @param idnumber 身份证号
     * @return
     */
    @GetMapping("/select")
    public Result select(@RequestParam("username") String username,@RequestParam("idnumber") String idnumber) {
        return usersService.getUser(username,idnumber);
    }

}
